<%-- 
    Document   : TheLoai
    Created on : Jun 15, 2013, 6:58:20 PM
    Author     : quannq
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>


<div id="comment-box">
    <input style="margin-bottom: -3px;" type="button"
           class="button-primary" value="Thêm Thể Loại 1"
           onclick="modalFormAdd('addtheloai1');"/>
    <input style="margin-bottom: -3px;margin-left: 100px;" type="button"
           class="button-primary" value="Thêm Thể Loại 2"
           onclick="modalFormAdd('addtheloai2');"/>
    <input style="margin-bottom: -3px; margin-left: 100px;" type="button"
           class="button-primary" value="Thêm Thể Loại 3"
           onclick="modalFormAdd('addtheloai3');"/>
</div>

<br>
<div id="theloai1">
    <table cellpadding="0" cellspacing="0" border="1" class="display example"
           style="color: black; width: 1000px;">
        <thead align="center">
            <tr>
                <th>ID</th>
                <th>Tên Thể Loại</th>
                <th>List Sách</th>
                <th>Thể Loại 2</th>
                <th>Thể Loại 3</th>
            </tr>
        </thead>
        <tbody align="center">
            <c:if test="${fn:length(theloai1) == 0}">
                <tr class="gradeX">
                    <td>No data</td>
                </tr>
            </c:if>

            <c:if test="${fn:length(theloai1) > 0}">
                <c:forEach items="${theloai1}" var="tl1">
                    <tr class="gradeX">
                        <td>${tl1.matl1}</td>
                        <td><a href="javascript:modalFormUpdate('infotheloai1',${tl1.matl1});">${tl1.tentl1}</a></td>
                        <td><img src="${pageContext.request.contextPath}/image/admin/view.png" 
                                 onclick="loadList('sach', 'listsachtl1',${tl1.matl1});
                   hideTag('theloai2');
                   hideTag('theloai3')"/></td>
                        <td><img src="${pageContext.request.contextPath}/image/admin/view.png"
                                 onclick="loadList('theloai2', 'theloai2_list',${tl1.matl1});
                   hideTag('theloai3');
                   hideTag('sach')"/></td>
                        <td><img src="${pageContext.request.contextPath}/image/admin/view.png" 
                                 onclick="loadList('theloai3', 'theloai3_list',${tl1.matl1});
                   hideTag('theloai2');
                   hideTag('sach')"/></td>
                    </tr>
                </c:forEach>
            </c:if>
        </tbody>
    </table>
</div>
<div id="theloai2" style="margin-top: 100px;"></div>
<div id="theloai3" style="margin-top: 100px;"></div>
<div id="sach" style="margin-top: 100px;"></div>

